package com.abc.robot01.vivemodel

import android.util.Log
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.abc.robot01.retrofit.RetrofitService
import kotlinx.coroutines.launch

class WaitingViewModel : ViewModel() {
    val TAG = "WaitingViewModel"
    val time = MutableLiveData("")

    init {
        viewModelScope.launch {
            val res = RetrofitService.instance.getEstimateFinishTime(
                accessToken = Robot.accessToken,
                currentRenderQueueType = "NORMAL"
            )
            Log.e(TAG, "获取渲染的预计完成时间: "+res.data);
            time.value = res.data
        }
    }
}

